///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
#include <Config.h>
//-----------------------------------------------------------------------------

class RefCounted
{
protected:
	RefCounted(u16 refCount = 0)	:	m_refCount( refCount )	{}

public:
	void		grab()			{	m_refCount++;		}
	
	void		drop()
	{
		ASSERT(m_refCount > 0);
		--m_refCount;
		if( m_refCount )
		{
			//TODO send to be garbage collected (maybe add a flag for automatic garbage collection)
		}
	}

	u16			getRefCount()	{	return m_refCount;	}

private:
	u16			m_refCount;
};

//-----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
